#include<stdio.h>

int main()
{
	int i = 0,count = 0;
	char arc[] = "654321"; //设置一个简单的密码
	char brc[10];          //输入密码的缓存区

	printf("请输入登陆密码：");
	scanf("%s", brc);

	for (count = 1; count < 3; count++)
	{
		if (strcmp(brc, arc)!= 0)
		{
			printf("请重新输入密码：");
			scanf("%s", brc);
		}
		else
			break;
	}
	if (count == 3)
		printf("三次密码错误，退出系统\n");
	else
		printf("登陆成功\n");

	return 0;
}
